package com.applet.category.service.impl;

import com.applet.category.mapper.CategoryMapper;
import com.applet.category.service.CategoryService;
import com.applet.entity.Category;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 分类管理 serviceImpl
 */
@Slf4j
@Service
public class CategoryServiceImpl implements CategoryService {


    @Resource
    private CategoryMapper categoryMapper;



    /**
     * 分类
     *     列表查询
     * @param type 1菜品  2套餐  可选参数
     */
    @Override
    public List<Category> queryPage(Integer type) {
        return categoryMapper.queryPage(type);
    }




    /**
     * 分类
     *      根据id查询分类
     * @param id
     */
    @Override
    public Category selectCategoryById(Long id) {
        return categoryMapper.selectCategoryById(id);
    }


}
